1300
|
Is it possible to cancel or discard the values during validation
// ValidateValue event - Occurs before user changes the cell's value.
procedure TForm1.G2antt1ValidateValue(ASender: TObject; Item : HITEM;ColIndex : Integer;NewValue : OleVariant;var Cancel : WordBool);
begin
with G2antt1 do
begin
OutputDebugString( 'ValidateValue' );
OutputDebugString( NewValue );
OutputDebugString( 'Change the Cancel parameter for ValidateValue event to accept/decline the newly value. ' );
OutputDebugString( 'The DiscardValidateValue restores back the previously values.' );
DiscardValidateValue();
end
end;
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
CauseValidateValue := EXG2ANTTLib_TLB.exValidateCell;
(IUnknown(Columns.Add('Date')) as EXG2ANTTLib_TLB.Column).Editor.EditType := EXG2ANTTLib_TLB.DateType;
(IUnknown(Columns.Add('Text')) as EXG2ANTTLib_TLB.Column).Editor.EditType := EXG2ANTTLib_TLB.EditType;
with Items do
begin
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
end;
EndUpdate();
end
|
1299
|
Is it possible to validate the values of the cells only when user leaves the focused item
// ValidateValue event - Occurs before user changes the cell's value.
procedure TForm1.G2antt1ValidateValue(ASender: TObject; Item : HITEM;ColIndex : Integer;NewValue : OleVariant;var Cancel : WordBool);
begin
with G2antt1 do
begin
OutputDebugString( 'ValidateValue' );
OutputDebugString( NewValue );
OutputDebugString( 'Change the Cancel parameter for ValidateValue event to accept/decline the newly value. ' );
Cancel := True;
OutputDebugString( 'You can not leave the item/record until the Cancel is False.' );
end
end;
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
CauseValidateValue := EXG2ANTTLib_TLB.exValidateItem;
(IUnknown(Columns.Add('Date')) as EXG2ANTTLib_TLB.Column).Editor.EditType := EXG2ANTTLib_TLB.DateType;
(IUnknown(Columns.Add('Text')) as EXG2ANTTLib_TLB.Column).Editor.EditType := EXG2ANTTLib_TLB.EditType;
with Items do
begin
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
end;
EndUpdate();
end
|
1298
|
We would like to validate the values of the cells. Is it possible
// ValidateValue event - Occurs before user changes the cell's value.
procedure TForm1.G2antt1ValidateValue(ASender: TObject; Item : HITEM;ColIndex : Integer;NewValue : OleVariant;var Cancel : WordBool);
begin
with G2antt1 do
begin
OutputDebugString( 'ValidateValue' );
OutputDebugString( NewValue );
OutputDebugString( 'Change the Cancel parameter for ValidateValue event to accept/decline the newly value.' );
Cancel := True;
OutputDebugString( 'You can not leave the cell until the Cancel is False.' );
end
end;
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
CauseValidateValue := EXG2ANTTLib_TLB.exValidateCell;
(IUnknown(Columns.Add('Date')) as EXG2ANTTLib_TLB.Column).Editor.EditType := EXG2ANTTLib_TLB.DateType;
(IUnknown(Columns.Add('Text')) as EXG2ANTTLib_TLB.Column).Editor.EditType := EXG2ANTTLib_TLB.EditType;
with Items do
begin
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
CellValue[OleVariant(AddItem('1/1/2001')),OleVariant(1)] := 'text';
end;
EndUpdate();
end
|
1297
|
Is there any way to add auto-numbering
with G2antt1 do
begin
with Columns do
begin
Add('Items');
with (IUnknown(Add('Pos')) as EXG2ANTTLib_TLB.Column) do
begin
FormatColumn := '1 pos ''''';
Position := 0;
end;
end;
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
end;
end
|
1296
|
How can I format my column to display the percent values “5,00%”
with G2antt1 do
begin
(IUnknown(Columns.Add('Percent')) as EXG2ANTTLib_TLB.Column).FormatColumn := '((dbl(value) * 100) format ''2|,|3.'')+''%''';
with Items do
begin
AddItem(OleVariant(0.5));
AddItem(OleVariant(0.4));
AddItem(OleVariant(0.75));
end;
end
|
1295
|
I can't control bar's transparency if the bar is overlaid. What can be done

with G2antt1 do
begin
ScrollBySingleLine := True;
Columns.Add('Task');
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
AllowLinkBars := False;
ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Task'] do
begin
OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
Overlaid[EXG2ANTTLib_TLB.exOverlaidBarsTransparent] := OleVariant(0);
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','A1',Null);
ItemBar[h,'A1',EXG2ANTTLib_TLB.exBarTransparent] := OleVariant(80);
AddBar(h,'Task','1/3/2001','1/5/2001','A2',Null);
AddBar(h,'Task','1/4/2001','1/7/2001','A3',Null);
h := AddItem('Task 2');
AddBar(h,'Task','1/7/2001','1/10/2001','A1',Null);
AddBar(h,'Task','1/8/2001','1/12/2001','A3',Null);
ItemBar[h,'A3',EXG2ANTTLib_TLB.exBarTransparent] := OleVariant(50);
end;
end
|
1294
|
How can I show the child items with no identation

with G2antt1 do
begin
LinesAtRoot := EXG2ANTTLib_TLB.exGroupLinesOutside;
Indent := 12;
HasLines := EXG2ANTTLib_TLB.exThinLine;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
end;
end
|
1293
|
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)

with G2antt1 do
begin
LinesAtRoot := EXG2ANTTLib_TLB.exGroupLinesAtRoot;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
1292
|
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)

with G2antt1 do
begin
LinesAtRoot := EXG2ANTTLib_TLB.exGroupLinesOutside;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
end;
end
|
1291
|
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)

with G2antt1 do
begin
LinesAtRoot := EXG2ANTTLib_TLB.exGroupLinesInsideLeaf;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
1290
|
Is there other ways of showing the hierarchy lines (exGroupLinesInside)

with G2antt1 do
begin
LinesAtRoot := EXG2ANTTLib_TLB.exGroupLinesInside;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
1289
|
Is there other ways of showing the hierarchy lines (exGroupLines)

with G2antt1 do
begin
LinesAtRoot := EXG2ANTTLib_TLB.exGroupLines;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(InsertItem(h,Null,'Child 2'),Null,'SubChild 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
1288
|
How can I specify non-working dates for any year, as a repetitive expression for instance

with G2antt1 do
begin
with Chart do
begin
AdjustLevelsToBase := True;
PaneWidth[False] := 0;
FirstVisibleDate := '12/24/2010';
FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
LevelCount := 2;
NonworkingDays := 0;
AddNonworkingDate('shortdateF(value) left 5 in (''01/01'',''01/06'',''04/25'',''05/01'',''06/02'',''08/15'',''11/01'',''12/08'',''12/25'',''12/26'')');
end;
end
|
1287
|
Is it possible to specify the Easter and a day after as being non-working
with G2antt1 do
begin
with Chart do
begin
AdjustLevelsToBase := True;
PaneWidth[False] := 0;
FirstVisibleDate := '4/14/2011';
FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
LevelCount := 2;
NonworkingDays := 0;
AddNonworkingDate('not(month(value) in (3,4,5)) ? 0 : ( floor(value)=(2:=floor(date(dateS(''3/1/'' + year(value)) + ((1:=(((255 - 11 * (year(value) m' +
'od 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) m' +
'od 7)))) or (floor(value)= =:2 + 1))');
end;
end
|
1286
|
Here's a simple sample to compute the Easter day
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
with (IUnknown(Columns.Add('Year')) as EXG2ANTTLib_TLB.Column).Editor do
begin
EditType := EXG2ANTTLib_TLB.SpinType;
Numeric := EXG2ANTTLib_TLB.exInteger;
end;
(IUnknown(Columns.Add('Easter')) as EXG2ANTTLib_TLB.Column).ComputedField := 'date(dateS(''3/1/'' + int(%0)) + ((1:=(((255 - 11 * (int(%0) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((int(%0) + ' +
'int(int(%0) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))';
with Items do
begin
AddItem(OleVariant(2008));
AddItem(OleVariant(2009));
AddItem(OleVariant(2010));
AddItem(OleVariant(2011));
end;
EndUpdate();
end
|
1285
|
How do I specify the Easter or holydays as non-working
with G2antt1 do
begin
with Chart do
begin
AdjustLevelsToBase := True;
PaneWidth[False] := 0;
FirstVisibleDate := '4/14/2011';
FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
LevelCount := 2;
NonworkingDays := 0;
AddNonworkingDate('month(value) = 7');
AddNonworkingDate('not(month(value) in (3,4)) ? 0 : ( floor(value)=floor(date(dateS(''3/1/'' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19)' +
') - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))' +
'))');
end;
end
|
1284
|
Is it possible to add a repetitive expression to define non-working dates
with G2antt1 do
begin
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := '1/1/2010';
FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
LevelCount := 2;
AddNonworkingDate('1/13/2010');
AddNonworkingDate('month(value) = 1 and (day(value) in (1,6))');
end;
end
|
1283
|
How do I get the Easter date
with G2antt1 do
begin
(IUnknown(Columns.Add('Easter')) as EXG2ANTTLib_TLB.Column).FormatColumn := 'date(dateS(''3/1/'' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((y' +
'ear(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))';
with Items do
begin
AddItem('1/1/1989');
AddItem('1/1/2001');
AddItem('1/1/2002');
AddItem('1/1/2003');
AddItem('1/1/2010');
end;
end
|
1282
|
How can I calculate the number of visible units
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
procedure TForm1.G2antt1Click(ASender: TObject; );
begin
with G2antt1 do
begin
with Chart do
begin
OutputDebugString( 'UnitCount:' );
OutputDebugString( CountVisibleUnits[OleVariant(DateFromPoint[0,-1]),OleVariant(DateFromPoint[1,-1])] );
end;
end
end;
with G2antt1 do
begin
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := '1/1/2010';
LevelCount := 2;
end;
end
|
1281
|
Is it possible to specify the nonworking up to minutes and I can see when using the inside zoom feature

with G2antt1 do
begin
BeginUpdate();
Chart.Bars.Add('Task:Split').Shortcut := 'Task';
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
PaneWidth[False] := 128;
LevelCount := 3;
UnitScale := EXG2ANTTLib_TLB.exHour;
UnitWidth := 16;
DrawLevelSeparator := EXG2ANTTLib_TLB.exLevelNoLine;
with Level[2] do
begin
Unit := EXG2ANTTLib_TLB.exMinute;
Count := 60;
end;
AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
ResizeUnitScale := EXG2ANTTLib_TLB.exMinute;
ResizeUnitCount := 15;
AllowInsideZoom := True;
with DefaultInsideZoomFormat do
begin
InsideUnit := EXG2ANTTLib_TLB.exMinute;
InsideCount := 15;
InsideLabel := '<%nn%>';
OwnerLabel := 'Hour: <b><%h%>';
DrawGridLines := True;
end;
InsideZooms.Add('1/1/2010 12:00:00 PM');
InsideZooms.Add('1/1/2010 1:00:00 PM');
FirstVisibleDate := '1/1/2010 9:00:00 AM';
end;
(IUnknown(Columns.Add('Non-Working')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
with Items do
begin
h := AddItem('12:30 to 14:00 Monday to Thursday, 12:30 to 13:30 on Friday');
ItemNonworkingUnits[h,OleVariant(False)] := 'weekday(value) case (default:((timeF(value)>="12:30:00" and timeF(value) <="14:00:00" ));5:( timeF(value)>="12:30:00" and timeF(' +
'value) <="13:30:00" );6:1;0:1) ';
h := AddItem('10:45 to 13:45 Monday to Thursday, 10:45 to 14:30 on Friday');
ItemNonworkingUnits[h,OleVariant(False)] := 'weekday(value) case (default:((timeF(value)>="10:45:00" and timeF(value) <="13:45:00" ));5:( timeF(value)>="10:45:00" and timeF(' +
'value) <="14:30:00" );6:1;0:1) ';
h := AddItem('2:30 to 9:30 on Friday, Saturday and Sunday');
ItemNonworkingUnits[h,OleVariant(False)] := 'weekday(value) case (default:((timeF(value)>="02:30:00" and timeF(value) <="09:30:00" ));1:0;2:0;3:0;4:0) ';
end;
EndUpdate();
end
|
1280
|
Is it possible to show the non-working units up to minutes

with G2antt1 do
begin
BeginUpdate();
Chart.Bars.Add('Task:Split').Shortcut := 'Task';
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
PaneWidth[False] := 128;
FirstVisibleDate := '1/1/2010';
LevelCount := 2;
UnitScale := EXG2ANTTLib_TLB.exHour;
UnitWidth := 16;
DrawLevelSeparator := EXG2ANTTLib_TLB.exLevelNoLine;
with Level[1] do
begin
Unit := EXG2ANTTLib_TLB.exMinute;
Count := 60;
end;
AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
ResizeUnitScale := EXG2ANTTLib_TLB.exMinute;
ResizeUnitCount := 15;
end;
(IUnknown(Columns.Add('Non-Working')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
with Items do
begin
h := AddItem('12:30 to 14:00 Monday to Thursday, 12:30 to 13:30 on Friday');
ItemNonworkingUnits[h,OleVariant(False)] := 'weekday(value) case (default:((timeF(value)>="12:30:00" and timeF(value) <="14:00:00" ));5:( timeF(value)>="12:30:00" and timeF(' +
'value) <="13:30:00" );6:1;0:1) ';
h := AddItem('10:45 to 13:45 Monday to Thursday, 10:45 to 14:30 on Friday');
ItemNonworkingUnits[h,OleVariant(False)] := 'weekday(value) case (default:((timeF(value)>="10:45:00" and timeF(value) <="13:45:00" ));5:( timeF(value)>="10:45:00" and timeF(' +
'value) <="14:30:00" );6:1;0:1) ';
h := AddItem('2:30 to 9:30 on Friday, Saturday and Sunday');
ItemNonworkingUnits[h,OleVariant(False)] := 'weekday(value) case (default:((timeF(value)>="02:30:00" and timeF(value) <="09:30:00" ));1:0;2:0;3:0;4:0) ';
end;
EndUpdate();
end
|
1279
|
Is it possible to define several type of progress bars

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
(IUnknown(Columns.Add('Start')) as EXG2ANTTLib_TLB.Column).Visible := False;
(IUnknown(Columns.Add('End')) as EXG2ANTTLib_TLB.Column).Visible := False;
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 64;
with Bars.Copy('Progress','ProgressT') do
begin
Color := $ff;
Shape := EXG2ANTTLib_TLB.exShapeSolid;
Height := 7;
end;
Bars.Add('Task%ProgressT:Split').Shortcut := 'Task';
with Bars.Item['Progress'] do
begin
Color := $ff0000;
Shape := EXG2ANTTLib_TLB.exShapeSolidUp;
end;
Bars.Add('Summary%Progress').Shortcut := 'Summary';
end;
with Items do
begin
h := AddItem('Project');
ItemHeight[h] := 16;
CellValue[OleVariant(h),OleVariant(1)] := '9/21/2006';
CellValue[OleVariant(h),OleVariant(2)] := '10/3/2006';
AddBar(h,'Summary',CellValue[OleVariant(h),OleVariant(1)],CellValue[OleVariant(h),OleVariant(2)],'sum',Null);
ItemBar[h,'sum',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.4);
ItemBar[h,'sum',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
h1 := InsertItem(h,Null,'Task 1');
CellValue[OleVariant(h1),OleVariant(1)] := CellValue[OleVariant(h),OleVariant(1)];
CellValue[OleVariant(h1),OleVariant(2)] := '9/27/2006';
AddBar(h1,'Task',CellValue[OleVariant(h1),OleVariant(1)],CellValue[OleVariant(h1),OleVariant(2)],'K1',Null);
ItemBar[h1,'K1',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.6);
ItemBar[h1,'K1',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
h2 := InsertItem(h,Null,'Task 2');
CellValue[OleVariant(h2),OleVariant(1)] := CellValue[OleVariant(h1),OleVariant(2)];
CellValue[OleVariant(h2),OleVariant(2)] := '9/28/2006';
AddBar(h2,'Unknown',CellValue[OleVariant(h2),OleVariant(1)],CellValue[OleVariant(h2),OleVariant(2)],'K2',Null);
AddLink('L1',h1,'K1',h2,'K2');
h3 := InsertItem(h,Null,'Task 3');
CellValue[OleVariant(h3),OleVariant(1)] := CellValue[OleVariant(h2),OleVariant(2)];
CellValue[OleVariant(h3),OleVariant(2)] := CellValue[OleVariant(h),OleVariant(2)];
AddBar(h3,'Task',CellValue[OleVariant(h3),OleVariant(1)],CellValue[OleVariant(h3),OleVariant(2)],'K3',Null);
ItemBar[h3,'K3',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.65);
ItemBar[h3,'K3',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
ItemBar[h3,'K3',EXG2ANTTLib_TLB.exBarPercentColor] := OleVariant(32768);
AddLink('L2',h2,'K2',h3,'K3');
GroupBars(h1,'K1',False,h2,'K2',True,OleVariant(31),'0;4');
GroupBars(h2,'K2',False,h3,'K3',True,OleVariant(31),'0;2');
DefineSummaryBars(h,'sum',h1,'K1');
DefineSummaryBars(h,'sum',h2,'K2');
DefineSummaryBars(h,'sum',h3,'K3');
ExpandItem[h] := True;
ItemBold[h] := True;
end;
EndUpdate();
end
|
1278
|
Is it possible to display the percent bar over the summary bar

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
with Chart do
begin
LevelCount := 2;
PaneWidth[False] := 64;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Progress'] do
begin
Color := $ff0000;
Shape := EXG2ANTTLib_TLB.exShapeSolidUp;
end;
Bars.Add('Summary%Progress').Shortcut := 'SummaryP';
end;
with Items do
begin
h := AddItem('Summary');
AddBar(h,'SummaryP','1/2/2001','1/6/2001','K1',Null);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.4);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
end;
EndUpdate();
end
|
1277
|
How can I display the percent value in the lower side of the bar

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Progress'] do
begin
Shape := EXG2ANTTLib_TLB.exShapeSolid;
Height := 7;
Color := $ff0000;
end;
Bars.Add('Task%Progress').Shortcut := 'Percent';
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Percent','1/2/2001','1/6/2001','K1',Null);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.5);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarVAlignPercent] := OleVariant(2);
h := AddItem('Task 2');
AddBar(h,'Percent','1/3/2001','1/9/2001','K2',Null);
end;
EndUpdate();
end
|
1276
|
Is it possible to change the percent's height

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Progress'] do
begin
Shape := EXG2ANTTLib_TLB.exShapeSolid;
Height := 7;
end;
Bars.Add('Task%Progress');
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task%Progress','1/2/2001','1/6/2001','K1',Null);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.5);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
end;
EndUpdate();
end
|
1275
|
How can I change the pattern for the percent bar

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Progress'] do
begin
Pattern := EXG2ANTTLib_TLB.exPatternBDiagonal;
Shape := EXG2ANTTLib_TLB.exShapeSolid;
Color := $c4;
end;
Bars.Add('Task%Progress');
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task%Progress','1/2/2001','1/6/2001','K1',Null);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.4);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
end;
EndUpdate();
end
|
1274
|
How can I change the look for the percent bar using EBN

with G2antt1 do
begin
BeginUpdate();
VisualAppearance.Add(1,'c:\exontrol\images\hot.ebn');
Columns.Add('Task');
with Chart do
begin
FirstVisibleDate := '1/1/2001';
with Bars.Item['Progress'] do
begin
Color := $1000000;
Shape := EXG2ANTTLib_TLB.exShapeSolid;
Height := 7;
end;
Bars.Add('Task%Progress');
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task%Progress','1/2/2001','1/6/2001','K1',Null);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.4);
end;
EndUpdate();
end
|
1273
|
Is it possible to align the percent bar to the bottom of the bar

with G2antt1 do
begin
BeginUpdate();
DefaultItemHeight := 32;
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 64;
FirstVisibleDate := '1/1/2001';
Bars.Item['Task'].Height := 28;
Bars.Add('Task%Progress').Shortcut := 'Percent';
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Percent','1/2/2001','1/14/2001','K1','text inside');
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarVAlignCaption] := OleVariant(0);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.75);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarPercentCaptionFormat] := '%p%';
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarVAlignPercent] := OleVariant(2);
end;
EndUpdate();
end
|
1272
|
Is it possible to show the percent on the bottom side of the bar, so I can leave the text upside

with G2antt1 do
begin
BeginUpdate();
DefaultItemHeight := 32;
Columns.Add('Task');
with Chart do
begin
PaneWidth[False] := 64;
FirstVisibleDate := '1/1/2001';
with Bars do
begin
Item['Task'].Height := 28;
with Item['Progress'] do
begin
Shape := EXG2ANTTLib_TLB.exShapeThinDown;
Height := 20;
Color := $ff0000;
end;
Add('Task%Progress').Shortcut := 'Percent';
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Percent','1/2/2001','1/14/2001','K1','text inside');
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarVAlignCaption] := OleVariant(0);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarPercent] := OleVariant(0.75);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarShowPercentCaption] := OleVariant(True);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarPercentCaptionFormat] := '<br>%p%';
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarAlignPercentCaption] := OleVariant(1);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarCanResizePercent] := OleVariant(False);
end;
EndUpdate();
end
|
1271
|
Is it possible to assign a multiple lines labels/captions to a bar

with G2antt1 do
begin
Columns.Add('Task');
Chart.FirstVisibleDate := '1/1/2001';
with Items do
begin
h := AddItem('Task 1');
ItemHeight[h] := 32;
AddBar(h,'Task','1/2/2001','1/6/2001','K1',Null);
ItemBar[h,'K1',EXG2ANTTLib_TLB.exBarCaption] := 'Line1<br>Line2';
end;
end
|
1270
|
Does your control supports multiple lines tooltip
with G2antt1 do
begin
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
ToolTipDelay := 1;
(IUnknown(Columns.Add('tootip')) as EXG2ANTTLib_TLB.Column).ToolTip := '<font Tahoma;20>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, icons' +
' and pictures.<br><img>pic1</img> picture ...';
end
|
1269
|
It is possible to write the word in red/color or to add a tooltip or a link to the word

with G2antt1 do
begin
Columns.Add('Task');
with Chart do
begin
LevelCount := 2;
FirstVisibleDate := '12/26/2000';
PaneWidth[False] := 32;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'','1/1/2001','1/5/2001','K1','some <fgcolor=FF0000>red</fgcolor> text');
ItemBar[h1,'K1',EXG2ANTTLib_TLB.exBarCanResize] := OleVariant(False);
ItemBar[h1,'K1',EXG2ANTTLib_TLB.exBarToolTip] := 'And here goes the <b>tooltip</b> of the text. ';
AddItem('');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','1/5/2001','1/7/2001','K2',Null);
ItemBar[h2,'K2',EXG2ANTTLib_TLB.exBarToolTip] := 'And here goes the <b>tooltip</b> of the bar. ';
AddLink('L1',h1,'K1',h2,'K2');
Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'L<b>inke</b>d to a bar';
Link['L1',EXG2ANTTLib_TLB.exLinkToolTip] := 'And here goes the <b>tooltip</b> of the link. ';
end;
end
|
1268
|
It is possible to use seconds/minutes/hours as time scale in your control, but using my regional settings

with G2antt1 do
begin
BeginUpdate();
with Chart do
begin
Label[EXG2ANTTLib_TLB.exMonth] := '<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> ''<%yy%><|><%loc_mmmm%> <%yyyy%>';
Label[EXG2ANTTLib_TLB.exWeek] := '<|><%ww%><|><%loc_m3%> <%d%>, ''<%yy%><r><%ww%><|><%loc_mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256';
Label[EXG2ANTTLib_TLB.exDay] := '<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%><|><%loc_dddd%>, <%loc_mmmm%> <%d%' +
'>, <%yyyy%><||><||>4096';
Label[EXG2ANTTLib_TLB.exHour] := '<|><%hh%><|><%h%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>' +
' <%h%> <%AM/PM%><||><||>65536';
Label[EXG2ANTTLib_TLB.exMinute] := '<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <' +
'%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>';
Label[EXG2ANTTLib_TLB.exSecond] := '<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><' +
'|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib_TLB.exMonth] := '<%loc_mmmm%>/<%yyyy%>';
LabelToolTip[EXG2ANTTLib_TLB.exWeek] := '<%loc_mmmm%> <%d%>, <%yyyy%> <%ww%>';
LabelToolTip[EXG2ANTTLib_TLB.exDay] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>';
LabelToolTip[EXG2ANTTLib_TLB.exHour] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib_TLB.exMinute] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib_TLB.exSecond] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>';
end;
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := '1/1/2001';
LevelCount := 4;
Level[0].Label := OleVariant(4096);
Level[1].Label := OleVariant(65536);
Level[2].Label := OleVariant(1048576);
with Level[3] do
begin
Count := 15;
Label := OleVariant(16777216);
end;
end;
EndUpdate();
end
|
1267
|
The chart's header is displayed in English. Can I change so it is the same as in my regional settings

with G2antt1 do
begin
BeginUpdate();
with Chart do
begin
Label[EXG2ANTTLib_TLB.exMonth] := '<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> ''<%yy%><|><%loc_mmmm%> <%yyyy%>';
Label[EXG2ANTTLib_TLB.exWeek] := '<|><%ww%><|><%loc_m3%> <%d%>, ''<%yy%><r><%ww%><|><%loc_mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256';
Label[EXG2ANTTLib_TLB.exDay] := '<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%><|><%loc_dddd%>, <%loc_mmmm%> <%d%' +
'>, <%yyyy%><||><||>4096';
Label[EXG2ANTTLib_TLB.exHour] := '<|><%hh%><|><%h%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>' +
' <%h%> <%AM/PM%><||><||>65536';
Label[EXG2ANTTLib_TLB.exMinute] := '<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <' +
'%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>';
Label[EXG2ANTTLib_TLB.exSecond] := '<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, ''<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><' +
'|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib_TLB.exMonth] := '<%loc_mmmm%>/<%yyyy%>';
LabelToolTip[EXG2ANTTLib_TLB.exWeek] := '<%loc_mmmm%> <%d%>, <%yyyy%> <%ww%>';
LabelToolTip[EXG2ANTTLib_TLB.exDay] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>';
LabelToolTip[EXG2ANTTLib_TLB.exHour] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib_TLB.exMinute] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>';
LabelToolTip[EXG2ANTTLib_TLB.exSecond] := '<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>';
end;
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := '1/1/2001';
LevelCount := 2;
UnitScale := EXG2ANTTLib_TLB.exDay;
end;
EndUpdate();
end
|
1266
|
It is possible to use seconds/minutes/hours as time scale in your control
with G2antt1 do
begin
BeginUpdate();
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := '1/1/2001';
LevelCount := 4;
Level[0].Label := OleVariant(4096);
Level[1].Label := OleVariant(65536);
Level[2].Label := OleVariant(1048576);
with Level[3] do
begin
Count := 15;
Label := OleVariant(16777216);
end;
end;
EndUpdate();
end
|
1265
|
Is it possible to resize chart's column/level using the mouse as we can for the columns, but do not want to resize up to hours
with G2antt1 do
begin
BeginUpdate();
with Chart do
begin
PaneWidth[False] := 32;
LevelCount := 2;
FirstVisibleDate := '1/1/2008';
AllowInsideZoom := True;
AllowResizeInsideZoom := True;
InsideZoomOnDblClick := False;
with DefaultInsideZoomFormat do
begin
OwnerLabel := '<%d%>';
InsideLabel := '';
InsideUnit := EXG2ANTTLib_TLB.exHour;
InsideCount := 24;
DrawTickLines := False;
DrawGridLines := False;
end;
with InsideZooms do
begin
SplitBaseLevel := False;
DefaultWidth := 18;
end;
end;
Columns.Add('Default');
with Items do
begin
AddBar(AddItem('Task'),'Task','1/3/2008','1/8/2008',Null,Null);
end;
EndUpdate();
end
|
1264
|
Is it possible to resize chart's column/level using the mouse as we can for the columns
with G2antt1 do
begin
BeginUpdate();
with Chart do
begin
PaneWidth[False] := 32;
LevelCount := 2;
FirstVisibleDate := '1/1/2008';
AllowInsideZoom := True;
AllowResizeInsideZoom := True;
InsideZoomOnDblClick := False;
with DefaultInsideZoomFormat do
begin
OwnerLabel := '<%d%>';
InsideLabel := '';
DrawTickLines := False;
DrawGridLines := False;
end;
with InsideZooms do
begin
SplitBaseLevel := False;
DefaultWidth := 18;
end;
end;
Columns.Add('Default');
with Items do
begin
AddBar(AddItem('Task'),'Task','1/3/2008','1/8/2008',Null,Null);
end;
EndUpdate();
end
|
1263
|
How can I empty or clear the undo/redo queue
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
AllowUndoRedo := True;
FirstVisibleDate := '6/20/2005';
AllowLinkBars := True;
LevelCount := 2;
PaneWidth[False] := 48;
end;
with Items do
begin
AddBar(AddItem('Task 1'),'Task','6/21/2005','6/25/2005','',Null);
AddBar(AddItem('Task 2'),'Task','6/28/2005','7/2/2005','',Null);
OutputDebugString( G2antt1.Chart.UndoListAction[Null,Null] );
OutputDebugString( 'Clear undo/redo queue' );
G2antt1.Chart.AllowUndoRedo := False;
G2antt1.Chart.AllowUndoRedo := True;
OutputDebugString( G2antt1.Chart.UndoListAction[Null,Null] );
end;
EndUpdate();
end
|
1262
|
How can I remove the undo/redo queue
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
AllowUndoRedo := True;
FirstVisibleDate := '6/20/2005';
AllowLinkBars := True;
LevelCount := 2;
PaneWidth[False] := 48;
end;
with Items do
begin
AddBar(AddItem('Task 1'),'Task','6/21/2005','6/25/2005','',Null);
AddBar(AddItem('Task 2'),'Task','6/28/2005','7/2/2005','',Null);
OutputDebugString( G2antt1.Chart.UndoListAction[Null,Null] );
OutputDebugString( 'Clear undo/redo queue' );
G2antt1.Chart.UndoRemoveAction(Null,Null);
G2antt1.Chart.RedoRemoveAction(Null,Null);
OutputDebugString( G2antt1.Chart.UndoListAction[Null,Null] );
end;
EndUpdate();
end
|
1261
|
Is it possible to prevent adding an undo operation for instance the RemoveLink(LinkKey) I call during the AddLink event
// AddLink event - Occurs when the user links two bars using the mouse.
procedure TForm1.G2antt1AddLink(ASender: TObject; LinkKey : WideString);
begin
with G2antt1 do
begin
Items.RemoveLink(OleVariant(LinkKey));
Chart.UndoRemoveAction(OleVariant(10),OleVariant(1));
Chart.UndoRemoveAction(OleVariant(11),OleVariant(1));
OutputDebugString( Chart.UndoListAction[Null,Null] );
end
end;
// ChartEndChanging event - Occurs after the chart has been changed.
procedure TForm1.G2antt1ChartEndChanging(ASender: TObject; Operation : BarOperationEnum);
begin
with G2antt1 do
begin
OutputDebugString( Chart.UndoListAction[Null,Null] );
end
end;
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
AllowUndoRedo := True;
FirstVisibleDate := '6/20/2005';
AllowLinkBars := True;
LevelCount := 2;
PaneWidth[False] := 48;
end;
with Items do
begin
AddBar(AddItem('Task 1'),'Task','6/21/2005','6/25/2005','',Null);
AddBar(AddItem('Task 2'),'Task','6/28/2005','7/2/2005','',Null);
end;
EndUpdate();
end
|
1260
|
Is it possible to rename the links from "Link1" to my choice
// AddLink event - Occurs when the user links two bars using the mouse.
procedure TForm1.G2antt1AddLink(ASender: TObject; LinkKey : WideString);
begin
with G2antt1 do
begin
Items.Link[OleVariant(LinkKey),EXG2ANTTLib_TLB.exLinkKey] := 'newIDlink';
end
end;
// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.G2antt1MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
with G2antt1 do
begin
OutputDebugString( Chart.LinkFromPoint[-1,-1] );
end
end;
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '6/20/2005';
AllowLinkBars := True;
LevelCount := 2;
PaneWidth[False] := 48;
end;
with Items do
begin
AddBar(AddItem('Task 1'),'Task','6/21/2005','6/25/2005','',Null);
AddBar(AddItem('Task 2'),'Task','6/28/2005','7/2/2005','',Null);
end;
EndUpdate();
end
|
1259
|
How can I prevent highlighting the column from the cursor - point

with G2antt1 do
begin
VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJg' +
'EgI=');
Background[EXG2ANTTLib_TLB.exCursorHoverColumn] := $1000000;
(IUnknown(Columns.Add('S')) as EXG2ANTTLib_TLB.Column).Width := 32;
(IUnknown(Columns.Add('Level 1')) as EXG2ANTTLib_TLB.Column).LevelKey := OleVariant(1);
(IUnknown(Columns.Add('Level 2')) as EXG2ANTTLib_TLB.Column).LevelKey := OleVariant(1);
(IUnknown(Columns.Add('Level 3')) as EXG2ANTTLib_TLB.Column).LevelKey := OleVariant(1);
(IUnknown(Columns.Add('E1')) as EXG2ANTTLib_TLB.Column).Width := 32;
(IUnknown(Columns.Add('E2')) as EXG2ANTTLib_TLB.Column).Width := 32;
(IUnknown(Columns.Add('E3')) as EXG2ANTTLib_TLB.Column).Width := 32;
(IUnknown(Columns.Add('E4')) as EXG2ANTTLib_TLB.Column).Width := 32;
end
|
1258
|
Is it possible to specify the background color for the item in the chart part only
with G2antt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Null,'Child 1');
G2antt1.Chart.ItemBackColor[hC] := $ff;
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
1257
|
Is it possible to apply different visual appearance, color, sizes for item in the list and chart part

with G2antt1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
VisualAppearance.Add(2,'c:\exontrol\images\pushed.ebn');
VisualAppearance.Add(3,'CP:2 2 2 -2 -2');
Columns.Add('Default');
SelBackMode := EXG2ANTTLib_TLB.exTransparent;
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Null,'Child 1');
ItemBackColor[hC] := $1ffff00;
G2antt1.Chart.ItemBackColor[hC] := $300ff00;
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
1256
|
How do I change the visual appearance for the entire item, using your EBN technology

with G2antt1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Null,'Child 1');
ItemBackColor[hC] := $1000000;
G2antt1.Chart.ItemBackColor[hC] := $1000000;
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
1255
|
is it possible to specify the a different background color for the item, list and chart part

with G2antt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Null,'Child 1');
ItemBackColor[hC] := $ff;
G2antt1.Chart.ItemBackColor[hC] := $ffff;
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
1254
|
Is it possible to specify the background color for the entire row, including the chart part

with G2antt1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Null,'Child 1');
ItemBackColor[hC] := $ff;
G2antt1.Chart.ItemBackColor[hC] := $ff;
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
1253
|
Is it possible to prevent overlaying the bars while moving or resizing the bars, so they get arranged once the bar is moved or resized
with G2antt1 do
begin
BeginUpdate();
ScrollBySingleLine := True;
Columns.Add('Task');
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
with Chart do
begin
OverlaidOnMoving := False;
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
AllowLinkBars := False;
ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
end;
with Items do
begin
AddItem('');
h := AddItem('Task');
AddBar(h,'Task','1/7/2001','1/10/2001','A1',Null);
AddBar(h,'Task','1/8/2001','1/12/2001','A3',Null);
end;
EndUpdate();
end
|
1252
|
Is it possible display numbers in the same format no matter of regional settings in the control panel
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(IUnknown(Columns.Add('Def')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
with Items do
begin
h := AddItem(OleVariant(100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default positive)''';
h := AddItem(OleVariant(100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''2|.|3|,|1|1'')';
h := AddItem(OleVariant(-100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default negative)''';
h := AddItem(OleVariant(-100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''2|.|3|,|1|1'')';
end;
EndUpdate();
end
|
1251
|
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(IUnknown(Columns.Add('Def')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
with Items do
begin
h := AddItem(OleVariant(0.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(OleVariant(0.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''|||||0'') + '' <fgcolor=808080>(Display no leading zeros)''';
end;
EndUpdate();
end
|
1250
|
How can I specify the format for negative numbers
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(IUnknown(Columns.Add('Def')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
with Items do
begin
h := AddItem(OleVariant(-100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(OleVariant(-100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''||||1'') + '' <fgcolor=808080>(Negative sign, number; for example, -1.1)''';
end;
EndUpdate();
end
|
1249
|
Is it possible to change the grouping character when display numbers
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(IUnknown(Columns.Add('Def')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
with Items do
begin
h := AddItem(OleVariant(100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(OleVariant(100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''|||-'') + '' <fgcolor=808080>(grouping character is -)''';
end;
EndUpdate();
end
|
1248
|
How can I display numbers with 2 digits in each group
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(IUnknown(Columns.Add('Def')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
with Items do
begin
h := AddItem(OleVariant(100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(OleVariant(100000.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''||2'') + '' <fgcolor=808080>(grouping by 2 digits)''';
end;
EndUpdate();
end
|
1247
|
How can I display my numbers using a different decimal separator
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(IUnknown(Columns.Add('Def')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
with Items do
begin
h := AddItem(OleVariant(100.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(OleVariant(100.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''|;'') + '' <fgcolor=808080>(decimal separator is <b>;</b>)''';
end;
EndUpdate();
end
|
1246
|
Is it possible to display the numbers using 3 (three) digits
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
(IUnknown(Columns.Add('Def')) as EXG2ANTTLib_TLB.Column).Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
with Items do
begin
h := AddItem(OleVariant(100.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format '''') + '' <fgcolor=808080>(default)''';
h := AddItem(OleVariant(100.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format ''3'') + '' <fgcolor=808080>(3 digits)''';
h := AddItem(OleVariant(100.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format 2) + '' <fgcolor=808080>(2 digits)''';
h := AddItem(OleVariant(100.27));
FormatCell[OleVariant(h),OleVariant(0)] := '(value format 1) + '' <fgcolor=808080>(1 digit)''';
end;
EndUpdate();
end
|
1245
|
Is it possible to format numbers

with G2antt1 do
begin
BeginUpdate();
MarkSearchColumn := False;
SelBackColor := BackColor;
SelForeColor := ForeColor;
ShowFocusRect := True;
Chart.PaneWidth[True] := 0;
with Columns do
begin
Add('Name');
with (IUnknown(Add('A')) as EXG2ANTTLib_TLB.Column) do
begin
SortType := EXG2ANTTLib_TLB.SortNumeric;
AllowSizing := False;
Width := 36;
FormatColumn := 'len(value) ? value + '' +''';
Editor.EditType := EXG2ANTTLib_TLB.SpinType;
end;
with (IUnknown(Add('B')) as EXG2ANTTLib_TLB.Column) do
begin
SortType := EXG2ANTTLib_TLB.SortNumeric;
AllowSizing := False;
Width := 36;
FormatColumn := 'len(value) ? value + '' +''';
Editor.EditType := EXG2ANTTLib_TLB.SpinType;
end;
with (IUnknown(Add('C')) as EXG2ANTTLib_TLB.Column) do
begin
SortType := EXG2ANTTLib_TLB.SortNumeric;
AllowSizing := False;
Width := 36;
FormatColumn := 'len(value) ? value + '' =''';
Editor.EditType := EXG2ANTTLib_TLB.SpinType;
end;
with (IUnknown(Add('A+B+C')) as EXG2ANTTLib_TLB.Column) do
begin
SortType := EXG2ANTTLib_TLB.SortNumeric;
Width := 64;
ComputedField := 'dbl(%1)+dbl(%2)+dbl(%3)';
FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' +
'0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )';
Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
end;
end;
with Items do
begin
h := AddItem('Root');
CellValueFormat[OleVariant(h),OleVariant(4)] := EXG2ANTTLib_TLB.exComputedField;
h1 := InsertItem(h,Null,'Child 1');
CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(7);
CellValue[OleVariant(h1),OleVariant(2)] := OleVariant(3);
CellValue[OleVariant(h1),OleVariant(3)] := OleVariant(1);
h1 := InsertItem(h,Null,'Child 2');
CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(-2);
CellValue[OleVariant(h1),OleVariant(2)] := OleVariant(-2);
CellValue[OleVariant(h1),OleVariant(3)] := OleVariant(-4);
h1 := InsertItem(h,Null,'Child 3');
CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(2);
CellValue[OleVariant(h1),OleVariant(2)] := OleVariant(2);
CellValue[OleVariant(h1),OleVariant(3)] := OleVariant(-4);
ExpandItem[h] := True;
end;
EndUpdate();
end
|
1244
|
How can I show the tooltip programmatically ( I want to be able to set the tooltip content dynamically just before the tooltip start to appear, not using the exBarTooltip )
// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.G2antt1MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
with G2antt1 do
begin
ShowToolTip(Chart.BarFromPoint[-1,-1],'',OleVariant(2),'4','-4');
end
end;
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Def');
with Chart do
begin
AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
PaneWidth[False] := 64;
LevelCount := 2;
FirstVisibleDate := '1/1/2010';
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2010','1/5/2010','A','A');
AddBar(h,'Task','1/5/2010','1/8/2010','B','B');
AddBar(h,'Task','1/8/2010','1/11/2010','C','C');
GroupBars(h,'A',False,h,'B',True,OleVariant(39),Null);
GroupBars(h,'B',False,h,'C',True,OleVariant(39),Null);
end;
EndUpdate();
end
|
1243
|
How can I set the column's width to my desired width
with G2antt1 do
begin
ColumnAutoResize := False;
with Columns do
begin
(IUnknown(Add('A')) as EXG2ANTTLib_TLB.Column).Width := 128;
(IUnknown(Add('B')) as EXG2ANTTLib_TLB.Column).Width := 128;
end;
DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
end
|
1242
|
Is it possible to prevent intersection of three bars or more

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Def');
with Chart do
begin
AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
PaneWidth[False] := 64;
LevelCount := 2;
FirstVisibleDate := '1/1/2010';
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2010','1/5/2010','A','A');
AddBar(h,'Task','1/5/2010','1/8/2010','B','B');
AddBar(h,'Task','1/8/2010','1/11/2010','C','C');
GroupBars(h,'A',False,h,'B',True,OleVariant(39),Null);
GroupBars(h,'B',False,h,'C',True,OleVariant(39),Null);
end;
EndUpdate();
end
|
1241
|
Is it possible to prevent intersection of two bars

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Def');
with Chart do
begin
AllowCreateBar := EXG2ANTTLib_TLB.exNoCreateBar;
PaneWidth[False] := 64;
LevelCount := 2;
FirstVisibleDate := '1/1/2010';
end;
with Items do
begin
h := AddItem('Task');
AddBar(h,'Task','1/2/2010','1/5/2010','A','A');
AddBar(h,'Task','1/5/2010','1/8/2010','B','B');
GroupBars(h,'A',False,h,'B',True,OleVariant(39),Null);
end;
EndUpdate();
end
|
1240
|
Is it possible to specify the cell's value but still want to display some formatted text instead the value
with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
Columns.Add('Value');
Columns.Add('FormatCell');
with Items do
begin
h := AddItem(OleVariant(1));
CellValue[OleVariant(h),OleVariant(1)] := OleVariant(12);
FormatCell[OleVariant(h),OleVariant(1)] := 'currency(value)';
h := AddItem('1/1/2001');
CellValue[OleVariant(h),OleVariant(1)] := '1/1/2001';
CellValueFormat[OleVariant(h),OleVariant(1)] := EXG2ANTTLib_TLB.exHTML;
FormatCell[OleVariant(h),OleVariant(1)] := 'longdate(value) replace ''2001'' with ''<b>2001</b>''';
end;
EndUpdate();
end
|
1239
|
How can I simulate displaying groups

with G2antt1 do
begin
HasLines := EXG2ANTTLib_TLB.exNoLine;
ScrollBySingleLine := True;
Chart.PaneWidth[True] := 0;
with Columns do
begin
Add('Name');
Add('A');
Add('B');
Add('C');
end;
with Items do
begin
h := AddItem('Group 1');
CellHAlignment[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.CenterAlignment;
ItemDivider[h] := 0;
ItemDividerLineAlignment[h] := EXG2ANTTLib_TLB.DividerBoth;
ItemHeight[h] := 24;
SortableItem[h] := False;
h1 := InsertItem(h,Null,'Child 1');
CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(1);
CellValue[OleVariant(h1),OleVariant(2)] := OleVariant(2);
CellValue[OleVariant(h1),OleVariant(3)] := OleVariant(3);
h1 := InsertItem(h,Null,'Child 2');
CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(4);
CellValue[OleVariant(h1),OleVariant(2)] := OleVariant(5);
CellValue[OleVariant(h1),OleVariant(3)] := OleVariant(6);
ExpandItem[h] := True;
h := AddItem('Group 2');
CellHAlignment[OleVariant(h),OleVariant(0)] := EXG2ANTTLib_TLB.CenterAlignment;
ItemDivider[h] := 0;
ItemDividerLineAlignment[h] := EXG2ANTTLib_TLB.DividerBoth;
ItemHeight[h] := 24;
SortableItem[h] := False;
h1 := InsertItem(h,Null,'Child 1');
CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(1);
CellValue[OleVariant(h1),OleVariant(2)] := OleVariant(2);
CellValue[OleVariant(h1),OleVariant(3)] := OleVariant(3);
h1 := InsertItem(h,Null,'Child 2');
CellValue[OleVariant(h1),OleVariant(1)] := OleVariant(4);
CellValue[OleVariant(h1),OleVariant(2)] := OleVariant(5);
CellValue[OleVariant(h1),OleVariant(3)] := OleVariant(6);
ExpandItem[h] := True;
end;
end
|
1238
|
Is it possible to specify the cell's value but still want to display some formatted text instead the value

with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
MarkSearchColumn := False;
with Columns do
begin
Add('Name');
with (IUnknown(Add('Values')) as EXG2ANTTLib_TLB.Column) do
begin
SortType := EXG2ANTTLib_TLB.SortNumeric;
AllowSizing := False;
Width := 64;
FormatColumn := '((0:=dbl(value)) < 10? ''<fgcolor=808080><font ;7>'' :''<b>'') + currency(=:0)';
Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
end;
end;
with Items do
begin
h := AddItem('Root');
FormatCell[OleVariant(h),OleVariant(1)] := '''<none>''';
CellValue[OleVariant(InsertItem(h,Null,'Child 1')),OleVariant(1)] := OleVariant(10);
CellValue[OleVariant(InsertItem(h,Null,'Child 2')),OleVariant(1)] := OleVariant(15);
CellValue[OleVariant(InsertItem(h,Null,'Child 3')),OleVariant(1)] := OleVariant(25);
ExpandItem[h] := True;
end;
EndUpdate();
end
|
1237
|
I am using the FormatColumn to display the current currency, but would like hide some values. Is it possible

with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
MarkSearchColumn := False;
with Columns do
begin
Add('Name');
with (IUnknown(Add('Values')) as EXG2ANTTLib_TLB.Column) do
begin
SortType := EXG2ANTTLib_TLB.SortNumeric;
AllowSizing := False;
Width := 64;
FormatColumn := '((0:=dbl(value)) < 10? ''<fgcolor=808080><font ;7>'' :''<b>'') + currency(=:0)';
Def[EXG2ANTTLib_TLB.exCellValueFormat] := OleVariant(1);
end;
end;
with Items do
begin
h := AddItem('Root');
FormatCell[OleVariant(h),OleVariant(1)] := ' ';
CellValue[OleVariant(InsertItem(h,Null,'Child 1')),OleVariant(1)] := OleVariant(10);
CellValue[OleVariant(InsertItem(h,Null,'Child 2')),OleVariant(1)] := OleVariant(15);
CellValue[OleVariant(InsertItem(h,Null,'Child 3')),OleVariant(1)] := OleVariant(25);
ExpandItem[h] := True;
end;
EndUpdate();
end
|
1236
|
I have a right-aligned column with check-boxes with no text, but it is not perfectly aligned. Is there something I can do
with G2antt1 do
begin
BeginUpdate();
TreeColumnIndex := -1;
DrawGridLines := EXG2ANTTLib_TLB.exAllLines;
ShowFocusRect := False;
with Columns do
begin
with (IUnknown(Add('Default-Right')) as EXG2ANTTLib_TLB.Column) do
begin
Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
Alignment := EXG2ANTTLib_TLB.RightAlignment;
HeaderAlignment := EXG2ANTTLib_TLB.RightAlignment;
end;
with (IUnknown(Add('Custom-Right')) as EXG2ANTTLib_TLB.Column) do
begin
Def[EXG2ANTTLib_TLB.exCellHasCheckBox] := OleVariant(True);
Def[EXG2ANTTLib_TLB.exCellDrawPartsOrder] := 'icon,icons,picture,caption,check';
HeaderAlignment := EXG2ANTTLib_TLB.RightAlignment;
Alignment := EXG2ANTTLib_TLB.RightAlignment;
end;
end;
with Items do
begin
AddItem(Null);
AddItem(Null);
AddItem(Null);
end;
EndUpdate();
end
|
1235
|
How can I specify that once I move or resize a bar other should be automatically moved/resized
with G2antt1 do
begin
BeginUpdate();
MarkSearchColumn := False;
Columns.Add('Tasks');
(IUnknown(Columns.Add('Start')) as EXG2ANTTLib_TLB.Column).Visible := False;
(IUnknown(Columns.Add('End')) as EXG2ANTTLib_TLB.Column).Visible := False;
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 64;
end;
with Items do
begin
h1 := AddItem('Item 1');
CellValue[OleVariant(h1),OleVariant(1)] := '9/21/2006';
CellValue[OleVariant(h1),OleVariant(2)] := '9/24/2006';
AddBar(h1,'Task',CellValue[OleVariant(h1),OleVariant(1)],CellValue[OleVariant(h1),OleVariant(2)],'',Null);
h2 := AddItem('Item 2');
CellValue[OleVariant(h2),OleVariant(1)] := '9/21/2006';
CellValue[OleVariant(h2),OleVariant(2)] := '9/24/2006';
AddBar(h2,'Task',CellValue[OleVariant(h2),OleVariant(1)],CellValue[OleVariant(h2),OleVariant(2)],'',Null);
GroupBars(h1,'',True,h2,'',True,Null,Null);
GroupBars(h1,'',False,h2,'',False,Null,Null);
end;
EndUpdate();
end
|
1234
|
How can I specify that once I move a bar other should be automatically moved
with G2antt1 do
begin
BeginUpdate();
MarkSearchColumn := False;
Columns.Add('Tasks');
(IUnknown(Columns.Add('Start')) as EXG2ANTTLib_TLB.Column).Visible := False;
(IUnknown(Columns.Add('End')) as EXG2ANTTLib_TLB.Column).Visible := False;
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 64;
end;
with Items do
begin
h1 := AddItem('Item 1');
CellValue[OleVariant(h1),OleVariant(1)] := '9/21/2006';
CellValue[OleVariant(h1),OleVariant(2)] := '9/24/2006';
AddBar(h1,'Task',CellValue[OleVariant(h1),OleVariant(1)],CellValue[OleVariant(h1),OleVariant(2)],'',Null);
h2 := AddItem('Item 2');
CellValue[OleVariant(h2),OleVariant(1)] := '9/21/2006';
CellValue[OleVariant(h2),OleVariant(2)] := '9/24/2006';
AddBar(h2,'Task',CellValue[OleVariant(h2),OleVariant(1)],CellValue[OleVariant(h2),OleVariant(2)],'',Null);
GroupBars(h1,'',True,h2,'',True,OleVariant(3),Null);
end;
EndUpdate();
end
|
1233
|
Is it possible to include the bar's caption in overlaying

with G2antt1 do
begin
BeginUpdate();
ScrollBySingleLine := True;
Columns.Add('Task');
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
AllowLinkBars := False;
ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Task'] do
begin
OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
OverlaidGroup := 'Milestone';
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','A1','task');
ItemBar[h,'A1',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
AddBar(h,'Milestone','1/3/2001','1/3/2001','M','milestone');
ItemBar[h,'M',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
h := AddItem('Task 2');
AddBar(h,'Task','1/8/2001','1/12/2001','A1','task');
ItemBar[h,'A1',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
AddBar(h,'Milestone','1/8/2001','1/8/2001','M','milestone');
ItemBar[h,'M',EXG2ANTTLib_TLB.exBarHAlignCaption] := OleVariant(18);
end;
EndUpdate();
end
|
1232
|
Sometimes, the milestone bars are not overlaying the task bars. What I am doing wrong
with G2antt1 do
begin
BeginUpdate();
ScrollBySingleLine := True;
Columns.Add('Task');
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
AllowLinkBars := False;
ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Task'] do
begin
OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsIncludeCaption) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
OverlaidGroup := 'Milestone';
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','A1',Null);
AddBar(h,'Milestone','1/3/2001','1/3/2001','M',Null);
h := AddItem('Task 2');
AddBar(h,'Task','1/7/2001','1/10/2001','A1',Null);
AddBar(h,'Milestone','1/8/2001','1/8/2001','M',Null);
end;
EndUpdate();
end
|
1231
|
Is it possible to add milestone bars in the same overlaid group as task is

with G2antt1 do
begin
BeginUpdate();
ScrollBySingleLine := True;
Columns.Add('Task');
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
with Chart do
begin
DrawGridLines := EXG2ANTTLib_TLB.exHLines;
AllowCreateBar := EXG2ANTTLib_TLB.exCreateBarAuto;
AllowLinkBars := False;
ResizeUnitScale := EXG2ANTTLib_TLB.exHour;
PaneWidth[False] := 48;
FirstVisibleDate := '1/1/2001';
with Bars.Item['Task'] do
begin
OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
OverlaidGroup := 'Milestone';
end;
end;
with Items do
begin
h := AddItem('Task 1');
AddBar(h,'Task','1/2/2001','1/4/2001','A1',Null);
AddBar(h,'Milestone','1/3/2001','1/3/2001','M',Null);
h := AddItem('Task 2');
AddBar(h,'Task','1/7/2001','1/10/2001','A1',Null);
AddBar(h,'Milestone','1/8/2001','1/8/2001','M',Null);
end;
EndUpdate();
end
|
1230
|
When adding a date column and setting the SortType to SortTypeEnum.SortDateTime, the column still sorts as a string. What am I doing wrong
with G2antt1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Date')) as EXG2ANTTLib_TLB.Column).SortType := EXG2ANTTLib_TLB.SortDateTime;
Columns.Add('String');
with Items do
begin
h := AddItem('1/1/2001');
CellValue[OleVariant(h),OleVariant(1)] := CellValue[OleVariant(h),OleVariant(0)];
h := AddItem('1/11/2001');
CellValue[OleVariant(h),OleVariant(1)] := CellValue[OleVariant(h),OleVariant(0)];
h := AddItem('1/2/2001');
CellValue[OleVariant(h),OleVariant(1)] := CellValue[OleVariant(h),OleVariant(0)];
end;
Columns.Item[OleVariant(0)].SortOrder := EXG2ANTTLib_TLB.SortDescending;
EndUpdate();
end
|
1229
|
Is it possible to move an item from a parent to another
with G2antt1 do
begin
BeginUpdate();
LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
AddItem('A');
AddItem('B');
InsertItem(AddItem('C'),'','D');
SetParent(FindItem['D',OleVariant(0),Null],FindItem['A',OleVariant(0),Null]);
end;
EndUpdate();
end
|
1228
|
How can I change the identation for an item
with G2antt1 do
begin
BeginUpdate();
LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
AddItem('A');
AddItem('B');
InsertItem(AddItem('C'),'','D');
SetParent(FindItem['D',OleVariant(0),Null],0);
end;
EndUpdate();
end
|
1227
|
Moving the bars fail if I am using GroupBars, exBarCanResize on 0 and exBarKeepWorkingCount on True ( bars keeps the working units and at runtime user can not resize them ). Is it possible to use the GroupBars while user should not be able to resize the bars at runtime

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
Bars.Add('Task:Split').Shortcut := 'Task';
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
ItemBar[h1,'',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
ItemBar[h1,'',EXG2ANTTLib_TLB.exBarCanResize] := OleVariant(4);
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
ItemBar[h2,'',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
ItemBar[h2,'',EXG2ANTTLib_TLB.exBarCanResize] := OleVariant(4);
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(2);
Link['L1',EXG2ANTTLib_TLB.exLinkEndPos] := OleVariant(0);
Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval + exLimitIntervalTreatAsWorking';
GroupBars(h1,'',False,h2,'',True,OleVariant(95),'2');
end;
EndUpdate();
end
|
1226
|
How can I collapse all items
with G2antt1 do
begin
BeginUpdate();
LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[0] := False;
end;
EndUpdate();
end
|
1225
|
How can I expand all items
with G2antt1 do
begin
BeginUpdate();
LinesAtRoot := EXG2ANTTLib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[0] := True;
end;
EndUpdate();
end
|
1224
|
How can I specify the distance between bars to be in a specified range of working units

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
Bars.Add('Task:Split').Shortcut := 'Task';
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(2);
Link['L1',EXG2ANTTLib_TLB.exLinkEndPos] := OleVariant(0);
Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval+exLimitIntervalTreatAsWorking';
GroupBars(h1,'',False,h2,'',True,OleVariant(95),'0;1;5');
ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
end;
EndUpdate();
end
|
1223
|
How can I specify the distance between bars to be in a specified range

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(2);
Link['L1',EXG2ANTTLib_TLB.exLinkEndPos] := OleVariant(0);
Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval';
GroupBars(h1,'',False,h2,'',True,OleVariant(31),'0;1;7');
end;
EndUpdate();
end
|
1222
|
How can I specify the distance between bars to be no more than a specified value in working units

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
Bars.Add('Task:Split').Shortcut := 'Task';
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(2);
Link['L1',EXG2ANTTLib_TLB.exLinkEndPos] := OleVariant(0);
Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval+exLimitIntervalTreatAsWorking';
GroupBars(h1,'',False,h2,'',True,OleVariant(95),'0;0;2');
ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
end;
EndUpdate();
end
|
1221
|
How can I specify the distance between bars to be no more than a specified value

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(2);
Link['L1',EXG2ANTTLib_TLB.exLinkEndPos] := OleVariant(0);
Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval';
GroupBars(h1,'',False,h2,'',True,OleVariant(31),'0;0;2');
end;
EndUpdate();
end
|
1220
|
How can I specify the distance between bars to be no less than a specified value in working units

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
Bars.Add('Task:Split').Shortcut := 'Task';
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(2);
Link['L1',EXG2ANTTLib_TLB.exLinkEndPos] := OleVariant(0);
Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitIntervalMin + exLimitIntervalTreatAsWorking';
GroupBars(h1,'',False,h2,'',True,OleVariant(79),'2');
ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
end;
EndUpdate();
end
|
1219
|
How can I specify the distance between bars to be no less than a specified value

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(2);
Link['L1',EXG2ANTTLib_TLB.exLinkEndPos] := OleVariant(0);
Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval + exLimitIntervalMin';
GroupBars(h1,'',False,h2,'',True,OleVariant(15),'2');
end;
EndUpdate();
end
|
1218
|
How do I specify the distance between bars to be exactly the specified value in working units

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
Bars.Add('Task:Split').Shortcut := 'Task';
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
AddItem('');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Task','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(2);
Link['L1',EXG2ANTTLib_TLB.exLinkEndPos] := OleVariant(0);
Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval + exLimitIntervalTreatAsWorking';
GroupBars(h1,'',False,h2,'',True,OleVariant(95),'2');
ItemBar[0,'<*>',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
end;
EndUpdate();
end
|
1217
|
How do I specify the distance between bars to be exactly the specified value

with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','','A');
AddItem('');
h2 := AddItem('Task 2');
AddBar(h2,'Unknown','9/26/2006','9/29/2006','','B');
AddLink('L1',h1,'',h2,'');
Link['L1',EXG2ANTTLib_TLB.exLinkStartPos] := OleVariant(2);
Link['L1',EXG2ANTTLib_TLB.exLinkEndPos] := OleVariant(0);
Link['L1',EXG2ANTTLib_TLB.exLinkText] := 'exPreserveBarLength + exIgnoreOriginalInterval';
GroupBars(h1,'',False,h2,'',True,OleVariant(7),'2');
end;
EndUpdate();
end
|
1216
|
How do I specify the day's duration to be working only
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
Chart.Bars.Add('Task:Split').Shortcut := 'Task';
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A',Null);
ItemBar[h1,'A',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
end;
EndUpdate();
end
|
1215
|
How do I specify the the user can't resize the bar at left side ( starting point )
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
Chart.Bars.Add('Task:Split').Shortcut := 'Task';
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','not resizable on left');
ItemBar[h1,'A',EXG2ANTTLib_TLB.exBarKeepWorkingCount] := OleVariant(True);
end;
EndUpdate();
end
|
1214
|
How do I specify the the user can't resize the bar at left side ( starting point )
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','not resizable on left');
ItemBar[h1,'A',EXG2ANTTLib_TLB.exBarCanResize] := OleVariant(2);
end;
EndUpdate();
end
|
1213
|
How do I specify the the user can't resize the bar at right side ( ending point )
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','not resizable on right');
ItemBar[h1,'A',EXG2ANTTLib_TLB.exBarCanResize] := OleVariant(1);
end;
EndUpdate();
end
|
1212
|
How do I specify the the user can't resize the bar at runtime
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','not resizable');
ItemBar[h1,'A',EXG2ANTTLib_TLB.exBarCanResize] := OleVariant(False);
end;
EndUpdate();
end
|
1211
|
How do I specify the day's duration to be at least a specified length
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','> 2 Days');
ItemBar[h1,'A',EXG2ANTTLib_TLB.exBarMinDuration] := OleVariant(2);
end;
EndUpdate();
end
|
1210
|
How do I specify the day's duration to be maximum a specified length
with G2antt1 do
begin
BeginUpdate();
Columns.Add('Tasks');
with Chart do
begin
FirstVisibleDate := '9/20/2006';
PaneWidth[False] := 48;
LevelCount := 2;
end;
with Items do
begin
h1 := AddItem('Task 1');
AddBar(h1,'Task','9/26/2006','9/29/2006','A','< 3 Days');
ItemBar[h1,'A',EXG2ANTTLib_TLB.exBarMaxDuration] := OleVariant(3);
end;
EndUpdate();
end
|
1209
|
I am trying to construct a timeline that is not date specific. My timeline starts at T=00:00:00 and then increases by 5 seconds. Is it possible

with G2antt1 do
begin
with Chart do
begin
PaneWidth[False] := 0;
FirstVisibleDate := OleVariant(0);
UnitWidth := 48;
NonworkingDays := 0;
with Level[0] do
begin
Label := '<%hh%>:<%nn%>:<%ss%>';
Unit := EXG2ANTTLib_TLB.exSecond;
Count := 5;
end;
end;
end
|
1208
|
How can I specify the levels using the user's Regional and Language Options

with G2antt1 do
begin
BeginUpdate();
Font.Name := 'Arial Unicode MS';
HeaderHeight := 36;
with Chart do
begin
FirstVisibleDate := '5/30/2010';
PaneWidth[False] := 0;
FirstWeekDay := EXG2ANTTLib_TLB.exMonday;
UnitWidth := 36;
LevelCount := 2;
with Level[0] do
begin
Label := '<b><%loc_mmmm%></b> <%yyyy%><br><%loc_sdate%><r> <%ww%> ';
ToolTip := Label;
Unit := EXG2ANTTLib_TLB.exWeek;
end;
with Level[1] do
begin
Label := '<%loc_ddd%><br><%d%>';
ToolTip := Label;
end;
ToolTip := '<%loc_ldate%>';
end;
EndUpdate();
end
|
1207
|
How do I arrange, format or layout the item on multiple levels or lines, as a subform

with G2antt1 do
begin
BeginUpdate();
Chart.PaneWidth[True] := 0;
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
DrawGridLines := EXG2ANTTLib_TLB.exRowLines;
HeaderVisible := EXG2ANTTLib_TLB.exHeaderHidden;
ItemsAllowSizing := EXG2ANTTLib_TLB.exResizeItem;
MarkSearchColumn := False;
ScrollBySingleLine := True;
BackColor := RGB(255,255,255);
SelBackColor := RGB(255,255,255);
SelForeColor := $80000012;
with Columns do
begin
Add('');
var_Column := (IUnknown(Add('Column')) as EXG2ANTTLib_TLB.Column);
with var_Column do
begin
Visible := False;
Editor.EditType := EXG2ANTTLib_TLB.EditType;
end;
var_Column1 := (IUnknown(Add('Column')) as EXG2ANTTLib_TLB.Column);
with var_Column1 do
begin
Visible := False;
Editor.EditType := EXG2ANTTLib_TLB.DropDownType;
end;
var_Column2 := (IUnknown(Add('Column')) as EXG2ANTTLib_TLB.Column);
with var_Column2 do
begin
Visible := False;
Editor.EditType := EXG2ANTTLib_TLB.DropDownType;
end;
var_Column3 := (IUnknown(Add('Column')) as EXG2ANTTLib_TLB.Column);
with var_Column3 do
begin
Visible := False;
with Editor do
begin
EditType := EXG2ANTTLib_TLB.CheckValueType;
Option[EXG2ANTTLib_TLB.exCheckValue2] := OleVariant(1);
end;
end;
var_Column4 := (IUnknown(Add('Column')) as EXG2ANTTLib_TLB.Column);
with var_Column4 do
begin
Visible := False;
Editor.EditType := EXG2ANTTLib_TLB.DateType;
end;
(IUnknown(Add('Column')) as EXG2ANTTLib_TLB.Column).Visible := False;
var_Column5 := (IUnknown(Add('Column')) as EXG2ANTTLib_TLB.Column);
with var_Column5 do
begin
Visible := False;
Editor.EditType := EXG2ANTTLib_TLB.DropDownType;
end;
var_Column6 := (IUnknown(Add('Column')) as EXG2ANTTLib_TLB.Column);
with var_Column6 do
begin
Visible := False;
Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(0);
var_Editor := Editor;
with var_Editor do
begin
EditType := EXG2ANTTLib_TLB.MemoType;
ButtonWidth := 17;
Option[EXG2ANTTLib_TLB.exDownArrow] := OleVariant(0);
Option[EXG2ANTTLib_TLB.exEndKey] := OleVariant(0);
Option[EXG2ANTTLib_TLB.exHomeKey] := OleVariant(0);
Option[EXG2ANTTLib_TLB.exLeftArrow] := OleVariant(0);
Option[EXG2ANTTLib_TLB.exMemoAutoSize] := OleVariant(0);
Option[EXG2ANTTLib_TLB.exMemoVScrollBar] := OleVariant(-1);
Option[EXG2ANTTLib_TLB.exPageDownKey] := OleVariant(0);
Option[EXG2ANTTLib_TLB.exPageUpKey] := OleVariant(0);
Option[EXG2ANTTLib_TLB.exRightArrow] := OleVariant(0);
Option[EXG2ANTTLib_TLB.exUpArrow] := OleVariant(0);
end;
Visible := False;
end;
(IUnknown(Add('Column')) as EXG2ANTTLib_TLB.Column).Visible := False;
end;
with Items do
begin
h0 := AddItem('');
CellValue[OleVariant(h0),OleVariant(9)] := 'Dismiss';
CellFormatLevel[OleVariant(h0),OleVariant(0)] := '12;" "[b=0][bg=RGB(248,248,248)]/(" "[b=0][bg=RGB(248,248,248)]:12,(1;" "[b=0]/(" "[b=0]:1,(25;(5;" "[b=0]/(("Subject:"[b=0]:80,' +
'(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1,(" "[b=0][bg=RGB(255,0,0)]:5,1[b=0])," "[b=0][bg=RGB(0,0,0)]:1)/1;" "[b=0]' +
'[bg=RGB(0,0,0)]))/1;" "[b=0]))/20;("Location:"[b=0]:80,(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1,2[b=0]," "[b=0][bg=' +
'RGB(0,0,0)]:1)/1;" "[b=0][bg=RGB(0,0,0)]),((" "[b=0]:10,"Label:"[b=0])):50,(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1' +
',3[b=0]," "[b=0][bg=RGB(0,0,0)]:1)/1;" "[b=0][bg=RGB(0,0,0)]))/50;(10;" "[b=0]/(1;" "[b=0][bg=RGB(255,0,0)]/("Recurrence:"[b=0]:' +
'80,"Occurs every day effective 20/04/2007 from 01:00 to 01:01."[b=0])/1;" "[b=0][bg=RGB(255,0,0)])/10;" "[b=0])/23;(4[b=0]:20,"R' +
'eminder:"[b=0]:60,(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1,5[b=0]," "[b=0][bg=RGB(0,0,0)]:1)/1;" "[b=0][bg=RGB(0,0,' +
'0)]),((" "[b=0]:5,6[b=0])):30,((" "[b=0]:10,"Show time as:"[b=0])):90,(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1,7[b=' +
'0]," "[b=0][bg=RGB(0,0,0)]:1)/1;" "[b=0][bg=RGB(0,0,0)]))/(12;" "[b=0]/(1;" "[b=0][bg=RGB(0,0,0)]/(" "[b=0][bg=RGB(0,0,0)]:1,8[b' +
'=0]," "[b=0][bg=RGB(0,0,0)]:1)/1;" "[b=0][bg=RGB(0,0,0)]))/35;(5;" "[b=0]/(" "[b=0]," "[b=0],((" "[b=0]:40,9[b=0])))/5;" "[b=0])' +
')," "[b=0]:1)/1;" "[b=0])," "[b=0][bg=RGB(248,248,248)]:12)/12;" "[b=0][bg=RGB(248,248,248)]';
CellHasCheckBox[OleVariant(h0),OleVariant(4)] := True;
CellHasButton[OleVariant(h0),OleVariant(9)] := True;
CellHAlignment[OleVariant(h0),OleVariant(9)] := EXG2ANTTLib_TLB.CenterAlignment;
CellVAlignment[OleVariant(h0),OleVariant(8)] := EXG2ANTTLib_TLB.exTop;
CellForeColor[OleVariant(h0),OleVariant(8)] := $0;
CellHasButton[OleVariant(h0),OleVariant(6)] := True;
CellValue[OleVariant(h0),OleVariant(6)] := '<img>1</img>';
CellValueFormat[OleVariant(h0),OleVariant(6)] := EXG2ANTTLib_TLB.exHTML;
CellHAlignment[OleVariant(h0),OleVariant(6)] := EXG2ANTTLib_TLB.CenterAlignment;
ItemHeight[h0] := 296;
end;
EndUpdate();
end
|
1206
|
How can I arrange the columns on multiple levels

with G2antt1 do
begin
BeginUpdate();
DefaultItemHeight := 48;
with Columns do
begin
(IUnknown(Add('Title')) as EXG2ANTTLib_TLB.Column).Visible := False;
(IUnknown(Add('FirstName')) as EXG2ANTTLib_TLB.Column).Visible := False;
(IUnknown(Add('LastName')) as EXG2ANTTLib_TLB.Column).Visible := False;
(IUnknown(Add('Photo')) as EXG2ANTTLib_TLB.Column).Visible := False;
with (IUnknown(Add('Address')) as EXG2ANTTLib_TLB.Column) do
begin
Visible := False;
Def[EXG2ANTTLib_TLB.exCellSingleLine] := OleVariant(False);
end;
with (IUnknown(Add('Personal Info')) as EXG2ANTTLib_TLB.Column) do
begin
FormatLevel := '3:48,(0/1/2),4:96';
Def[EXG2ANTTLib_TLB.exCellFormatLevel] := '3:48,(0/1/2),4:96';
end;
end;
Chart.FirstVisibleDate := '1/1/2010';
Chart.Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib_TLB.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib_TLB.exOverlaidBarsStack);
with Items do
begin
h := AddItem('Sales Representative');
CellValue[OleVariant(h),OleVariant(1)] := 'Nancy';
CellValue[OleVariant(h),OleVariant(2)] := 'Davolio';
CellPicture[OleVariant(h),OleVariant(3)] := G2antt1.ExecuteTemplate('loadpicture(`c:\exontrol\images\zipdisk.gif`)');
CellValue[OleVariant(h),OleVariant(4)] := '507-20th Ave. E.Apt. 2A';
AddBar(h,'Task','1/1/2010','1/5/2010',OleVariant(2),OleVariant(2));
AddBar(h,'Task','1/4/2010','1/8/2010',OleVariant(1),OleVariant(1));
end;
EndUpdate();
end
|
1205
|
Is it possible to display a bar only using a gradient color using the exBarColor option

with G2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '12/31/2009';
LevelCount := 2;
PaneWidth[False] := 96;
with Bars.Item['Task'] do
begin
StartColor := $ffffff;
EndColor := StartColor;
Height := 17;
end;
end;
Columns.Add('Types');
with Items do
begin
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Null);
h := AddItem('W/h Gradient');
AddBar(h,'Task','1/4/2010','1/9/2010','',Null);
ItemBar[h,'',EXG2ANTTLib_TLB.exBarPattern] := OleVariant(227);
h := AddItem('W/h Color');
AddBar(h,'Task','1/4/2010','1/9/2010','',Null);
ItemBar[h,'',EXG2ANTTLib_TLB.exBarPattern] := OleVariant(227);
ItemBar[h,'',EXG2ANTTLib_TLB.exBarColor] := OleVariant(255);
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Null);
end;
EndUpdate();
end
|
1204
|
Is it possible to display a bar only using a gradient color

with G2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '12/31/2009';
LevelCount := 2;
PaneWidth[False] := 96;
with Bars.Item['Task'] do
begin
StartColor := $ffffff;
EndColor := StartColor;
Height := 17;
end;
end;
Columns.Add('Types');
with Items do
begin
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Null);
h := AddItem('W/h Gradient');
AddBar(h,'Task','1/4/2010','1/9/2010','',Null);
ItemBar[h,'',EXG2ANTTLib_TLB.exBarPattern] := OleVariant(227);
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Null);
end;
EndUpdate();
end
|
1203
|
Is it possible to display a bar only using a gradient color

with G2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '12/31/2009';
LevelCount := 2;
PaneWidth[False] := 96;
with Bars.Item['Task'] do
begin
StartColor := $ffffff;
EndColor := Color;
end;
end;
Columns.Add('Types');
with Items do
begin
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Null);
h := AddItem('W/h Gradient');
AddBar(h,'Task','1/4/2010','1/9/2010','',Null);
ItemBar[h,'',EXG2ANTTLib_TLB.exBarPattern] := OleVariant(99);
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Null);
end;
EndUpdate();
end
|
1202
|
How can I display a specified bar only with a thicker border

with G2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '12/31/2009';
LevelCount := 2;
PaneWidth[False] := 96;
end;
Columns.Add('Types');
with Items do
begin
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Null);
h := AddItem('W/h Border');
AddBar(h,'Task','1/4/2010','1/9/2010','',Null);
ItemBar[h,'',EXG2ANTTLib_TLB.exBarPattern] := OleVariant(4099);
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Null);
end;
EndUpdate();
end
|
1201
|
Is it possible to display the shadow for a specified bar

with G2antt1 do
begin
BeginUpdate();
with Chart do
begin
FirstVisibleDate := '12/31/2009';
LevelCount := 2;
PaneWidth[False] := 96;
end;
Columns.Add('Types');
with Items do
begin
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Null);
h := AddItem('W/h Shadow');
AddBar(h,'Task','1/4/2010','1/9/2010','',Null);
ItemBar[h,'',EXG2ANTTLib_TLB.exBarPattern] := OleVariant(8195);
AddBar(AddItem('Original'),'Task','1/4/2010','1/9/2010','',Null);
end;
EndUpdate();
end
|